package hr.ctg.service.dao;

import hr.ctg.domain.model.Park;
import hr.jpa.dao.GenericDAOImpl;

import java.util.List;

import org.jboss.seam.annotations.AutoCreate;
import org.jboss.seam.annotations.Name;

@AutoCreate
@Name("parkDAO")
public class ParkDAO extends GenericDAOImpl<Park, Integer> {

	@SuppressWarnings("unchecked")
	public List<Park> findByTip(final String tip) {
		return entityManager.createNamedQuery("Park.findByTip").setParameter(1,
				tip).getResultList();
	}

	public List<Park> findByLatLonNotNull() {
		return executeNamedQuery("Park.findByLatLonNotNull");
	}

}
